#include "header.h"

int main(int argc,char const *argv[])
{
    if(argc < 2)
    {
        perror("usage:a.out + filename");
        return -1;
    }
    //2
    int fd = creat(argv[1],0664);
    printf("fd = %d\n",fd);
    //等价2
    //creat = open(argv[1],O_CREAT|O_WRONLY|O_TRUNC,0664);
    close(fd);
    return 0;
}